<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <h2>年龄：{{ age }}</h2>
        <input type="button" value="点击增加" v-on:click="change">
    </div>

    <!-- 引入vue -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js" ></script>
    <script>
        new Vue({
            el:"#app",
            data:{
                msg:"hello",
                age:10

            },
            methods:{
                change:function () {
                    console.log(this);
                    this.age+=1;
                }
            }
        })
    </script>
</body>
</html>